﻿Imports System.Data.OleDb
Public Class rss
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Sql As String = "SELECT ID, GameName, ReleaseDate, Platform, SeriesName, ThumbNail, OfficialWebsite, DetailPic, Description FROM GameQuery"
        Dim conn As OleDbConnection = New OleDbConnection(ConfigurationManager.ConnectionStrings("WarriorConnection").ConnectionString)
        Dim cmd As OleDbCommand = New OleDbCommand(Sql, conn)

        conn.Open()
        Dim dr As OleDbDataReader = cmd.ExecuteReader()
        rptRSS.DataSource = dr
        rptRSS.DataBind()
        conn.Close()
    End Sub

    Public Function FormatForXML(ByVal input As Object) As String
        Dim data As String = input.ToString()

        data = data.Replace("&", "&amp;")
        data = data.Replace("\", "&quot;")
        data = data.Replace("'", "&apos;")
        data = data.Replace("<", "&lt;")
        data = data.Replace(">", "&gt;")

        Return data
    End Function
End Class